pub type __time_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
pub type __clock_t = ::std::os::raw::c_long;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub const BSL_SAL_ONCE_INIT: u32 = 0;
pub const SAL_IPV4: u32 = 2;
pub const SAL_IPV6: u32 = 10;
pub const SAL_PROTO_IP_LEVEL: u32 = 0;
pub const SAL_PROTO_IPV6_LEVEL: u32 = 41;
pub const SAL_MTU_OPTION: u32 = 14;
pub const SAL_IPV6_MTU_OPTION: u32 = 24;
pub type BSL_SAL_ThreadLockHandle = *mut ::std::os::raw::c_void;
pub type BSL_SAL_ThreadId = *mut ::std::os::raw::c_void;
pub type BSL_SAL_Mutex = *mut ::std::os::raw::c_void;
pub type BSL_SAL_CondVar = *mut ::std::os::raw::c_void;
unsafe extern "C" {
    pub fn BSL_SAL_Malloc(size: u32) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_SAL_Calloc(num: u32, size: u32) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_SAL_Dump(
        src: *const ::std::os::raw::c_void,
        size: u32,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_SAL_Free(value: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    pub fn BSL_SAL_Realloc(
        addr: *mut ::std::os::raw::c_void,
        newSize: u32,
        oldSize: u32,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_SAL_CleanseData(ptr: *mut ::std::os::raw::c_void, size: u32);
}
unsafe extern "C" {
    pub fn BSL_SAL_ClearFree(ptr: *mut ::std::os::raw::c_void, size: u32);
}
pub type time_t = __time_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
    pub tv_sec: __time_t,
    pub tv_nsec: __syscall_slong_t,
}
pub type pid_t = __pid_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sched_param {
    pub sched_priority: ::std::os::raw::c_int,
}
pub type __cpu_mask = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cpu_set_t {
    pub __bits: [__cpu_mask; 16usize],
}
unsafe extern "C" {
    pub fn __sched_cpucount(__setsize: usize, __setp: *const cpu_set_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn __sched_cpualloc(__count: usize) -> *mut cpu_set_t;
}
unsafe extern "C" {
    pub fn __sched_cpufree(__set: *mut cpu_set_t);
}
unsafe extern "C" {
    pub fn sched_setparam(__pid: __pid_t, __param: *const sched_param) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_getparam(__pid: __pid_t, __param: *mut sched_param) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_setscheduler(
        __pid: __pid_t,
        __policy: ::std::os::raw::c_int,
        __param: *const sched_param,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_getscheduler(__pid: __pid_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_yield() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_get_priority_max(__algorithm: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_get_priority_min(__algorithm: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn sched_rr_get_interval(__pid: __pid_t, __t: *mut timespec) -> ::std::os::raw::c_int;
}
pub type clock_t = __clock_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tm {
    pub tm_sec: ::std::os::raw::c_int,
    pub tm_min: ::std::os::raw::c_int,
    pub tm_hour: ::std::os::raw::c_int,
    pub tm_mday: ::std::os::raw::c_int,
    pub tm_mon: ::std::os::raw::c_int,
    pub tm_year: ::std::os::raw::c_int,
    pub tm_wday: ::std::os::raw::c_int,
    pub tm_yday: ::std::os::raw::c_int,
    pub tm_isdst: ::std::os::raw::c_int,
    pub tm_gmtoff: ::std::os::raw::c_long,
    pub tm_zone: *const ::std::os::raw::c_char,
}
pub type clockid_t = __clockid_t;
pub type timer_t = __timer_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct itimerspec {
    pub it_interval: timespec,
    pub it_value: timespec,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigevent {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_struct {
    pub __locales: [*mut __locale_data; 13usize],
    pub __ctype_b: *const ::std::os::raw::c_ushort,
    pub __ctype_tolower: *const ::std::os::raw::c_int,
    pub __ctype_toupper: *const ::std::os::raw::c_int,
    pub __names: [*const ::std::os::raw::c_char; 13usize],
}
pub type __locale_t = *mut __locale_struct;
pub type locale_t = __locale_t;
unsafe extern "C" {
    pub fn clock() -> clock_t;
}
unsafe extern "C" {
    pub fn time(__timer: *mut time_t) -> time_t;
}
unsafe extern "C" {
    pub fn difftime(__time1: time_t, __time0: time_t) -> f64;
}
unsafe extern "C" {
    pub fn mktime(__tp: *mut tm) -> time_t;
}
unsafe extern "C" {
    pub fn strftime(
        __s: *mut ::std::os::raw::c_char,
        __maxsize: usize,
        __format: *const ::std::os::raw::c_char,
        __tp: *const tm,
    ) -> usize;
}
unsafe extern "C" {
    pub fn strftime_l(
        __s: *mut ::std::os::raw::c_char,
        __maxsize: usize,
        __format: *const ::std::os::raw::c_char,
        __tp: *const tm,
        __loc: locale_t,
    ) -> usize;
}
unsafe extern "C" {
    pub fn gmtime(__timer: *const time_t) -> *mut tm;
}
unsafe extern "C" {
    pub fn localtime(__timer: *const time_t) -> *mut tm;
}
unsafe extern "C" {
    pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
}
unsafe extern "C" {
    pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
}
unsafe extern "C" {
    pub fn asctime(__tp: *const tm) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ctime(__timer: *const time_t) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn asctime_r(
        __tp: *const tm,
        __buf: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ctime_r(
        __timer: *const time_t,
        __buf: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub static mut __tzname: [*mut ::std::os::raw::c_char; 2usize];
}
unsafe extern "C" {
    pub static mut __daylight: ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub static mut __timezone: ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub static mut tzname: [*mut ::std::os::raw::c_char; 2usize];
}
unsafe extern "C" {
    pub fn tzset();
}
unsafe extern "C" {
    pub static mut daylight: ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub static mut timezone: ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn timegm(__tp: *mut tm) -> time_t;
}
unsafe extern "C" {
    pub fn timelocal(__tp: *mut tm) -> time_t;
}
unsafe extern "C" {
    pub fn dysize(__year: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn nanosleep(
        __requested_time: *const timespec,
        __remaining: *mut timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clock_nanosleep(
        __clock_id: clockid_t,
        __flags: ::std::os::raw::c_int,
        __req: *const timespec,
        __rem: *mut timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timer_create(
        __clock_id: clockid_t,
        __evp: *mut sigevent,
        __timerid: *mut timer_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timer_delete(__timerid: timer_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timer_settime(
        __timerid: timer_t,
        __flags: ::std::os::raw::c_int,
        __value: *const itimerspec,
        __ovalue: *mut itimerspec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timer_getoverrun(__timerid: timer_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn timespec_get(
        __ts: *mut timespec,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
    pub __value64: ::std::os::raw::c_ulonglong,
    pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
    pub __low: ::std::os::raw::c_uint,
    pub __high: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
    pub __prev: *mut __pthread_internal_list,
    pub __next: *mut __pthread_internal_list,
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
    pub __next: *mut __pthread_internal_slist,
}
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
    pub __lock: ::std::os::raw::c_int,
    pub __count: ::std::os::raw::c_uint,
    pub __owner: ::std::os::raw::c_int,
    pub __nusers: ::std::os::raw::c_uint,
    pub __kind: ::std::os::raw::c_int,
    pub __spins: ::std::os::raw::c_short,
    pub __elision: ::std::os::raw::c_short,
    pub __list: __pthread_list_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
    pub __readers: ::std::os::raw::c_uint,
    pub __writers: ::std::os::raw::c_uint,
    pub __wrphase_futex: ::std::os::raw::c_uint,
    pub __writers_futex: ::std::os::raw::c_uint,
    pub __pad3: ::std::os::raw::c_uint,
    pub __pad4: ::std::os::raw::c_uint,
    pub __cur_writer: ::std::os::raw::c_int,
    pub __shared: ::std::os::raw::c_int,
    pub __rwelision: ::std::os::raw::c_schar,
    pub __pad1: [::std::os::raw::c_uchar; 7usize],
    pub __pad2: ::std::os::raw::c_ulong,
    pub __flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
    pub __wseq: __atomic_wide_counter,
    pub __g1_start: __atomic_wide_counter,
    pub __g_refs: [::std::os::raw::c_uint; 2usize],
    pub __g_size: [::std::os::raw::c_uint; 2usize],
    pub __g1_orig_size: ::std::os::raw::c_uint,
    pub __wrefs: ::std::os::raw::c_uint,
    pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
pub type __tss_t = ::std::os::raw::c_uint;
pub type __thrd_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __once_flag {
    pub __data: ::std::os::raw::c_int,
}
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
    pub __data: __pthread_mutex_s,
    pub __size: [::std::os::raw::c_char; 40usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
    pub __data: __pthread_cond_s,
    pub __size: [::std::os::raw::c_char; 48usize],
    pub __align: ::std::os::raw::c_longlong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
    pub __data: __pthread_rwlock_arch_t,
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
    pub __size: [::std::os::raw::c_char; 8usize],
    pub __align: ::std::os::raw::c_long,
}
pub type pthread_spinlock_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
    pub __size: [::std::os::raw::c_char; 32usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
    pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __jmp_buf_tag {
    pub __jmpbuf: __jmp_buf,
    pub __mask_was_saved: ::std::os::raw::c_int,
    pub __saved_mask: __sigset_t,
}
pub const PTHREAD_CREATE_JOINABLE: _bindgen_ty_1 = 0;
pub const PTHREAD_CREATE_DETACHED: _bindgen_ty_1 = 1;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
pub const PTHREAD_MUTEX_TIMED_NP: _bindgen_ty_2 = 0;
pub const PTHREAD_MUTEX_RECURSIVE_NP: _bindgen_ty_2 = 1;
pub const PTHREAD_MUTEX_ERRORCHECK_NP: _bindgen_ty_2 = 2;
pub const PTHREAD_MUTEX_ADAPTIVE_NP: _bindgen_ty_2 = 3;
pub const PTHREAD_MUTEX_NORMAL: _bindgen_ty_2 = 0;
pub const PTHREAD_MUTEX_RECURSIVE: _bindgen_ty_2 = 1;
pub const PTHREAD_MUTEX_ERRORCHECK: _bindgen_ty_2 = 2;
pub const PTHREAD_MUTEX_DEFAULT: _bindgen_ty_2 = 0;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
pub const PTHREAD_MUTEX_STALLED: _bindgen_ty_3 = 0;
pub const PTHREAD_MUTEX_STALLED_NP: _bindgen_ty_3 = 0;
pub const PTHREAD_MUTEX_ROBUST: _bindgen_ty_3 = 1;
pub const PTHREAD_MUTEX_ROBUST_NP: _bindgen_ty_3 = 1;
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
pub const PTHREAD_PRIO_NONE: _bindgen_ty_4 = 0;
pub const PTHREAD_PRIO_INHERIT: _bindgen_ty_4 = 1;
pub const PTHREAD_PRIO_PROTECT: _bindgen_ty_4 = 2;
pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_5 = 0;
pub const PTHREAD_RWLOCK_PREFER_WRITER_NP: _bindgen_ty_5 = 1;
pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_5 = 2;
pub const PTHREAD_RWLOCK_DEFAULT_NP: _bindgen_ty_5 = 0;
pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
pub const PTHREAD_INHERIT_SCHED: _bindgen_ty_6 = 0;
pub const PTHREAD_EXPLICIT_SCHED: _bindgen_ty_6 = 1;
pub type _bindgen_ty_6 = ::std::os::raw::c_uint;
pub const PTHREAD_SCOPE_SYSTEM: _bindgen_ty_7 = 0;
pub const PTHREAD_SCOPE_PROCESS: _bindgen_ty_7 = 1;
pub type _bindgen_ty_7 = ::std::os::raw::c_uint;
pub const PTHREAD_PROCESS_PRIVATE: _bindgen_ty_8 = 0;
pub const PTHREAD_PROCESS_SHARED: _bindgen_ty_8 = 1;
pub type _bindgen_ty_8 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _pthread_cleanup_buffer {
    pub __routine: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
    pub __arg: *mut ::std::os::raw::c_void,
    pub __canceltype: ::std::os::raw::c_int,
    pub __prev: *mut _pthread_cleanup_buffer,
}
pub const PTHREAD_CANCEL_ENABLE: _bindgen_ty_9 = 0;
pub const PTHREAD_CANCEL_DISABLE: _bindgen_ty_9 = 1;
pub type _bindgen_ty_9 = ::std::os::raw::c_uint;
pub const PTHREAD_CANCEL_DEFERRED: _bindgen_ty_10 = 0;
pub const PTHREAD_CANCEL_ASYNCHRONOUS: _bindgen_ty_10 = 1;
pub type _bindgen_ty_10 = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn pthread_create(
        __newthread: *mut pthread_t,
        __attr: *const pthread_attr_t,
        __start_routine: ::std::option::Option<
            unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void,
        >,
        __arg: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_exit(__retval: *mut ::std::os::raw::c_void) -> !;
}
unsafe extern "C" {
    pub fn pthread_join(
        __th: pthread_t,
        __thread_return: *mut *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_detach(__th: pthread_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_self() -> pthread_t;
}
unsafe extern "C" {
    pub fn pthread_equal(__thread1: pthread_t, __thread2: pthread_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_init(__attr: *mut pthread_attr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_destroy(__attr: *mut pthread_attr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getdetachstate(
        __attr: *const pthread_attr_t,
        __detachstate: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setdetachstate(
        __attr: *mut pthread_attr_t,
        __detachstate: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getguardsize(
        __attr: *const pthread_attr_t,
        __guardsize: *mut usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setguardsize(
        __attr: *mut pthread_attr_t,
        __guardsize: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getschedparam(
        __attr: *const pthread_attr_t,
        __param: *mut sched_param,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setschedparam(
        __attr: *mut pthread_attr_t,
        __param: *const sched_param,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getschedpolicy(
        __attr: *const pthread_attr_t,
        __policy: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setschedpolicy(
        __attr: *mut pthread_attr_t,
        __policy: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getinheritsched(
        __attr: *const pthread_attr_t,
        __inherit: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setinheritsched(
        __attr: *mut pthread_attr_t,
        __inherit: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getscope(
        __attr: *const pthread_attr_t,
        __scope: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setscope(
        __attr: *mut pthread_attr_t,
        __scope: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getstackaddr(
        __attr: *const pthread_attr_t,
        __stackaddr: *mut *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setstackaddr(
        __attr: *mut pthread_attr_t,
        __stackaddr: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getstacksize(
        __attr: *const pthread_attr_t,
        __stacksize: *mut usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setstacksize(
        __attr: *mut pthread_attr_t,
        __stacksize: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_getstack(
        __attr: *const pthread_attr_t,
        __stackaddr: *mut *mut ::std::os::raw::c_void,
        __stacksize: *mut usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_attr_setstack(
        __attr: *mut pthread_attr_t,
        __stackaddr: *mut ::std::os::raw::c_void,
        __stacksize: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_setschedparam(
        __target_thread: pthread_t,
        __policy: ::std::os::raw::c_int,
        __param: *const sched_param,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_getschedparam(
        __target_thread: pthread_t,
        __policy: *mut ::std::os::raw::c_int,
        __param: *mut sched_param,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_setschedprio(
        __target_thread: pthread_t,
        __prio: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_once(
        __once_control: *mut pthread_once_t,
        __init_routine: ::std::option::Option<unsafe extern "C" fn()>,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_setcancelstate(
        __state: ::std::os::raw::c_int,
        __oldstate: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_setcanceltype(
        __type: ::std::os::raw::c_int,
        __oldtype: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cancel(__th: pthread_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_testcancel();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __cancel_jmp_buf_tag {
    pub __cancel_jmp_buf: __jmp_buf,
    pub __mask_was_saved: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_unwind_buf_t {
    pub __cancel_jmp_buf: [__cancel_jmp_buf_tag; 1usize],
    pub __pad: [*mut ::std::os::raw::c_void; 4usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cleanup_frame {
    pub __cancel_routine:
        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
    pub __cancel_arg: *mut ::std::os::raw::c_void,
    pub __do_it: ::std::os::raw::c_int,
    pub __cancel_type: ::std::os::raw::c_int,
}
unsafe extern "C" {
    pub fn __pthread_register_cancel(__buf: *mut __pthread_unwind_buf_t);
}
unsafe extern "C" {
    pub fn __pthread_unregister_cancel(__buf: *mut __pthread_unwind_buf_t);
}
unsafe extern "C" {
    pub fn __pthread_unwind_next(__buf: *mut __pthread_unwind_buf_t) -> !;
}
unsafe extern "C" {
    pub fn __sigsetjmp(
        __env: *mut __jmp_buf_tag,
        __savemask: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_init(
        __mutex: *mut pthread_mutex_t,
        __mutexattr: *const pthread_mutexattr_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_destroy(__mutex: *mut pthread_mutex_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_trylock(__mutex: *mut pthread_mutex_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_lock(__mutex: *mut pthread_mutex_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_timedlock(
        __mutex: *mut pthread_mutex_t,
        __abstime: *const timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_unlock(__mutex: *mut pthread_mutex_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_getprioceiling(
        __mutex: *const pthread_mutex_t,
        __prioceiling: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_setprioceiling(
        __mutex: *mut pthread_mutex_t,
        __prioceiling: ::std::os::raw::c_int,
        __old_ceiling: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutex_consistent(__mutex: *mut pthread_mutex_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_init(__attr: *mut pthread_mutexattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_destroy(__attr: *mut pthread_mutexattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_getpshared(
        __attr: *const pthread_mutexattr_t,
        __pshared: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_setpshared(
        __attr: *mut pthread_mutexattr_t,
        __pshared: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_gettype(
        __attr: *const pthread_mutexattr_t,
        __kind: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_settype(
        __attr: *mut pthread_mutexattr_t,
        __kind: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_getprotocol(
        __attr: *const pthread_mutexattr_t,
        __protocol: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_setprotocol(
        __attr: *mut pthread_mutexattr_t,
        __protocol: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_getprioceiling(
        __attr: *const pthread_mutexattr_t,
        __prioceiling: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_setprioceiling(
        __attr: *mut pthread_mutexattr_t,
        __prioceiling: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_getrobust(
        __attr: *const pthread_mutexattr_t,
        __robustness: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_mutexattr_setrobust(
        __attr: *mut pthread_mutexattr_t,
        __robustness: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_init(
        __rwlock: *mut pthread_rwlock_t,
        __attr: *const pthread_rwlockattr_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_destroy(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_rdlock(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_tryrdlock(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_timedrdlock(
        __rwlock: *mut pthread_rwlock_t,
        __abstime: *const timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_wrlock(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_trywrlock(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_timedwrlock(
        __rwlock: *mut pthread_rwlock_t,
        __abstime: *const timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlock_unlock(__rwlock: *mut pthread_rwlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_init(__attr: *mut pthread_rwlockattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_destroy(__attr: *mut pthread_rwlockattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_getpshared(
        __attr: *const pthread_rwlockattr_t,
        __pshared: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_setpshared(
        __attr: *mut pthread_rwlockattr_t,
        __pshared: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_getkind_np(
        __attr: *const pthread_rwlockattr_t,
        __pref: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_rwlockattr_setkind_np(
        __attr: *mut pthread_rwlockattr_t,
        __pref: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_init(
        __cond: *mut pthread_cond_t,
        __cond_attr: *const pthread_condattr_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_destroy(__cond: *mut pthread_cond_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_signal(__cond: *mut pthread_cond_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_broadcast(__cond: *mut pthread_cond_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_wait(
        __cond: *mut pthread_cond_t,
        __mutex: *mut pthread_mutex_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_cond_timedwait(
        __cond: *mut pthread_cond_t,
        __mutex: *mut pthread_mutex_t,
        __abstime: *const timespec,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_init(__attr: *mut pthread_condattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_destroy(__attr: *mut pthread_condattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_getpshared(
        __attr: *const pthread_condattr_t,
        __pshared: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_setpshared(
        __attr: *mut pthread_condattr_t,
        __pshared: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_getclock(
        __attr: *const pthread_condattr_t,
        __clock_id: *mut __clockid_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_condattr_setclock(
        __attr: *mut pthread_condattr_t,
        __clock_id: __clockid_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_spin_init(
        __lock: *mut pthread_spinlock_t,
        __pshared: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_spin_destroy(__lock: *mut pthread_spinlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_spin_lock(__lock: *mut pthread_spinlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_spin_trylock(__lock: *mut pthread_spinlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_spin_unlock(__lock: *mut pthread_spinlock_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrier_init(
        __barrier: *mut pthread_barrier_t,
        __attr: *const pthread_barrierattr_t,
        __count: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrier_destroy(__barrier: *mut pthread_barrier_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrier_wait(__barrier: *mut pthread_barrier_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrierattr_init(__attr: *mut pthread_barrierattr_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrierattr_destroy(__attr: *mut pthread_barrierattr_t)
        -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrierattr_getpshared(
        __attr: *const pthread_barrierattr_t,
        __pshared: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_barrierattr_setpshared(
        __attr: *mut pthread_barrierattr_t,
        __pshared: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_key_create(
        __key: *mut pthread_key_t,
        __destr_function: ::std::option::Option<
            unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void),
        >,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_key_delete(__key: pthread_key_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_getspecific(__key: pthread_key_t) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn pthread_setspecific(
        __key: pthread_key_t,
        __pointer: *const ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_getcpuclockid(
        __thread_id: pthread_t,
        __clock_id: *mut __clockid_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pthread_atfork(
        __prepare: ::std::option::Option<unsafe extern "C" fn()>,
        __parent: ::std::option::Option<unsafe extern "C" fn()>,
        __child: ::std::option::Option<unsafe extern "C" fn()>,
    ) -> ::std::os::raw::c_int;
}
pub type BSL_SAL_OnceControl = pthread_once_t;
unsafe extern "C" {
    pub fn BSL_SAL_ThreadLockNew(lock: *mut BSL_SAL_ThreadLockHandle) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadReadLock(lock: BSL_SAL_ThreadLockHandle) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadWriteLock(lock: BSL_SAL_ThreadLockHandle) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadUnlock(lock: BSL_SAL_ThreadLockHandle) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadLockFree(lock: BSL_SAL_ThreadLockHandle);
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadGetId() -> u64;
}
unsafe extern "C" {
    pub fn BSL_SAL_GetPid() -> i32;
}
pub type BSL_SAL_ThreadInitRoutine = ::std::option::Option<unsafe extern "C" fn()>;
unsafe extern "C" {
    pub fn BSL_SAL_ThreadRunOnce(
        onceControl: *mut BSL_SAL_OnceControl,
        initFunc: BSL_SAL_ThreadInitRoutine,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadCreate(
        thread: *mut BSL_SAL_ThreadId,
        startFunc: ::std::option::Option<
            unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void,
        >,
        arg: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_ThreadClose(thread: BSL_SAL_ThreadId);
}
unsafe extern "C" {
    pub fn BSL_SAL_CreateCondVar(condVar: *mut BSL_SAL_CondVar) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_CondSignal(condVar: BSL_SAL_CondVar) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_CondTimedwaitMs(
        condMutex: BSL_SAL_Mutex,
        condVar: BSL_SAL_CondVar,
        timeout: i32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_DeleteCondVar(condVar: BSL_SAL_CondVar) -> i32;
}
pub type bsl_sal_file_handle = *mut ::std::os::raw::c_void;
unsafe extern "C" {
    pub fn BSL_SAL_FileOpen(
        stream: *mut bsl_sal_file_handle,
        path: *const ::std::os::raw::c_char,
        mode: *const ::std::os::raw::c_char,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_FileClose(stream: bsl_sal_file_handle);
}
unsafe extern "C" {
    pub fn BSL_SAL_FileRead(
        stream: bsl_sal_file_handle,
        buffer: *mut ::std::os::raw::c_void,
        size: usize,
        num: usize,
        len: *mut usize,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_FileWrite(
        stream: bsl_sal_file_handle,
        buffer: *const ::std::os::raw::c_void,
        size: usize,
        num: usize,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_FileLength(path: *const ::std::os::raw::c_char, len: *mut usize) -> i32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BSL_TIME {
    pub year: u16,
    pub month: u8,
    pub day: u8,
    pub hour: u8,
    pub minute: u8,
    pub millSec: u16,
    pub second: u8,
    pub microSec: u16,
}
pub type BslUnixTime = i64;
pub type BslTimeFunc = ::std::option::Option<unsafe extern "C" fn() -> BslUnixTime>;
unsafe extern "C" {
    pub fn BSL_SAL_SysTimeFuncReg(func: BslTimeFunc);
}
unsafe extern "C" {
    pub fn BSL_SAL_DateTimeCompare(
        dateA: *const BSL_TIME,
        dateB: *const BSL_TIME,
        diffSec: *mut i64,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SysTimeGet(sysTime: *mut BSL_TIME) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_CurrentSysTimeGet() -> BslUnixTime;
}
unsafe extern "C" {
    pub fn BSL_SAL_DateToUtcTimeConvert(dateTime: *const BSL_TIME, utcTime: *mut i64) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_UtcTimeToDateConvert(utcTime: i64, sysTime: *mut BSL_TIME) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_DateTimeCompareByUs(dateA: *const BSL_TIME, dateB: *const BSL_TIME) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_Sleep(time: u32);
}
unsafe extern "C" {
    pub fn BSL_SAL_Tick() -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn BSL_SAL_TicksPerSec() -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn BSL_SAL_TIME_GetNSec() -> u64;
}
pub type BSL_SAL_SockAddr = *mut ::std::os::raw::c_void;
pub type BSL_SAL_SockAddrInfo = *mut ::std::os::raw::c_void;
pub type BslSalSockAddrNew =
    ::std::option::Option<unsafe extern "C" fn(sockAddr: *mut BSL_SAL_SockAddr) -> i32>;
pub type BslSalSockAddrFree =
    ::std::option::Option<unsafe extern "C" fn(sockAddr: BSL_SAL_SockAddr)>;
pub type BslSalSockAddrGetFamily =
    ::std::option::Option<unsafe extern "C" fn(sockAddr: BSL_SAL_SockAddr) -> i32>;
pub type BslSalSockAddrSize =
    ::std::option::Option<unsafe extern "C" fn(sockAddr: BSL_SAL_SockAddr) -> u32>;
pub type BslSalSockAddrCopy =
    ::std::option::Option<unsafe extern "C" fn(dst: BSL_SAL_SockAddr, src: BSL_SAL_SockAddr)>;
unsafe extern "C" {
    pub fn BSL_SAL_Socket(af: i32, type_: i32, protocol: i32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockClose(sockId: i32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SetSockopt(
        sockId: i32,
        level: i32,
        name: i32,
        val: *const ::std::os::raw::c_void,
        len: i32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_GetSockopt(
        sockId: i32,
        level: i32,
        name: i32,
        val: *mut ::std::os::raw::c_void,
        len: *mut i32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockListen(sockId: i32, backlog: i32) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockBind(sockId: i32, addr: BSL_SAL_SockAddr, len: usize) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockConnect(sockId: i32, addr: BSL_SAL_SockAddr, len: usize) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockSend(
        sockId: i32,
        msg: *const ::std::os::raw::c_void,
        len: usize,
        flags: i32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockRecv(
        sockfd: i32,
        buff: *mut ::std::os::raw::c_void,
        len: usize,
        flags: i32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_Select(
        nfds: i32,
        readfds: *mut ::std::os::raw::c_void,
        writefds: *mut ::std::os::raw::c_void,
        exceptfds: *mut ::std::os::raw::c_void,
        timeout: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_Ioctlsocket(
        sockId: i32,
        cmd: ::std::os::raw::c_long,
        arg: *mut ::std::os::raw::c_ulong,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_SockGetLastSocketError() -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_StrcaseCmp(
        str1: *const ::std::os::raw::c_char,
        str2: *const ::std::os::raw::c_char,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_Memchr(
        str_: *const ::std::os::raw::c_char,
        character: i32,
        count: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn BSL_SAL_Atoi(str_: *const ::std::os::raw::c_char) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_Strnlen(string: *const ::std::os::raw::c_char, count: u32) -> u32;
}
pub const BSL_SAL_MEM_MALLOC: BSL_SAL_CB_FUNC_TYPE = 256;
pub const BSL_SAL_MEM_FREE: BSL_SAL_CB_FUNC_TYPE = 257;
pub const BSL_SAL_THREAD_LOCK_NEW_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 512;
pub const BSL_SAL_THREAD_LOCK_FREE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 513;
pub const BSL_SAL_THREAD_LOCK_READ_LOCK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 514;
pub const BSL_SAL_THREAD_LOCK_WRITE_LOCK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 515;
pub const BSL_SAL_THREAD_LOCK_UNLOCK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 516;
pub const BSL_SAL_THREAD_GET_ID_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 517;
pub const BSL_SAL_THREAD_RUN_ONCE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 518;
pub const BSL_SAL_NET_WRITE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 768;
pub const BSL_SAL_NET_READ_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 769;
pub const BSL_SAL_NET_SOCK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 770;
pub const BSL_SAL_NET_SOCK_CLOSE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 771;
pub const BSL_SAL_NET_SET_SOCK_OPT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 772;
pub const BSL_SAL_NET_GET_SOCK_OPT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 773;
pub const BSL_SAL_NET_SOCK_LISTEN_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 774;
pub const BSL_SAL_NET_SOCK_BIND_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 775;
pub const BSL_SAL_NET_SOCK_CONNECT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 776;
pub const BSL_SAL_NET_SOCK_SEND_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 777;
pub const BSL_SAL_NET_SOCK_RECV_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 778;
pub const BSL_SAL_NET_SELECT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 779;
pub const BSL_SAL_NET_IOCTL_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 780;
pub const BSL_SAL_NET_SOCKGETLASTSOCKETERROR_CB_FUNC: BSL_SAL_CB_FUNC_TYPE =
    781;
pub const BSL_SAL_NET_SOCKADDR_NEW_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 782;
pub const BSL_SAL_NET_SOCKADDR_FREE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 783;
pub const BSL_SAL_NET_SOCKADDR_SIZE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 784;
pub const BSL_SAL_NET_SENDTO_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 785;
pub const BSL_SAL_NET_RECVFROM_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 786;
pub const BSL_SAL_NET_GETFAMILY_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 787;
pub const BSL_SAL_TIME_GET_UTC_TIME_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1024;
pub const BSL_SAL_TIME_DATE_TO_STR_CONVERT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE =
    1025;
pub const BSL_SAL_TIME_SYS_TIME_GET_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1026;
pub const BSL_SAL_TIME_UTC_TIME_TO_DATE_CONVERT_CB_FUNC: BSL_SAL_CB_FUNC_TYPE =
    1027;
pub const BSL_SAL_TIME_SLEEP_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1028;
pub const BSL_SAL_TIME_TICK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1029;
pub const BSL_SAL_TIME_TICK_PER_SEC_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1030;
pub const BSL_SAL_TIME_GET_TIME_IN_NS: BSL_SAL_CB_FUNC_TYPE = 1031;
pub const BSL_SAL_FILE_OPEN_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1280;
pub const BSL_SAL_FILE_READ_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1281;
pub const BSL_SAL_FILE_WRITE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1282;
pub const BSL_SAL_FILE_CLOSE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1283;
pub const BSL_SAL_FILE_LENGTH_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1284;
pub const BSL_SAL_FILE_ERROR_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1285;
pub const BSL_SAL_FILE_TELL_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1286;
pub const BSL_SAL_FILE_SEEK_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1287;
pub const BSL_SAL_FILE_GETS_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1288;
pub const BSL_SAL_FILE_PUTS_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1289;
pub const BSL_SAL_FILE_FLUSH_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1290;
pub const BSL_SAL_FILE_EOF_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1291;
pub const BSL_SAL_FILE_SET_ATTR_FUNC: BSL_SAL_CB_FUNC_TYPE = 1292;
pub const BSL_SAL_FILE_GET_ATTR_FUNC: BSL_SAL_CB_FUNC_TYPE = 1293;
pub const BSL_SAL_DL_OPEN_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1792;
pub const BSL_SAL_DL_CLOSE_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1793;
pub const BSL_SAL_DL_SYM_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 1794;
pub const BSL_SAL_PID_GET_ID_CB_FUNC: BSL_SAL_CB_FUNC_TYPE = 2048;
pub const BSL_SAL_MAX_FUNC_CB: BSL_SAL_CB_FUNC_TYPE = 65535;
pub type BSL_SAL_CB_FUNC_TYPE = ::std::os::raw::c_uint;
pub type BslSalMalloc =
    ::std::option::Option<unsafe extern "C" fn(size: u32) -> *mut ::std::os::raw::c_void>;
pub type BslSalFree =
    ::std::option::Option<unsafe extern "C" fn(addr: *mut ::std::os::raw::c_void)>;
pub type BslSalThreadLockNew =
    ::std::option::Option<unsafe extern "C" fn(lock: *mut BSL_SAL_ThreadLockHandle) -> i32>;
pub type BslSalThreadLockFree =
    ::std::option::Option<unsafe extern "C" fn(lock: BSL_SAL_ThreadLockHandle)>;
pub type BslSalThreadReadLock =
    ::std::option::Option<unsafe extern "C" fn(lock: BSL_SAL_ThreadLockHandle) -> i32>;
pub type BslSalThreadWriteLock =
    ::std::option::Option<unsafe extern "C" fn(lock: BSL_SAL_ThreadLockHandle) -> i32>;
pub type BslSalThreadUnlock =
    ::std::option::Option<unsafe extern "C" fn(lock: BSL_SAL_ThreadLockHandle) -> i32>;
pub type BslSalThreadGetId = ::std::option::Option<unsafe extern "C" fn() -> u64>;
pub type BslSalThreadRunOnce = ::std::option::Option<
    unsafe extern "C" fn(onceControl: *mut u32, initFunc: BSL_SAL_ThreadInitRoutine) -> i32,
>;
pub type BslSalFileOpen = ::std::option::Option<
    unsafe extern "C" fn(
        stream: *mut bsl_sal_file_handle,
        path: *const ::std::os::raw::c_char,
        mode: *const ::std::os::raw::c_char,
    ) -> i32,
>;
pub type BslSalFileRead = ::std::option::Option<
    unsafe extern "C" fn(
        stream: bsl_sal_file_handle,
        buffer: *mut ::std::os::raw::c_void,
        size: usize,
        num: usize,
        len: *mut usize,
    ) -> i32,
>;
pub type BslSalFileWrite = ::std::option::Option<
    unsafe extern "C" fn(
        stream: bsl_sal_file_handle,
        buffer: *const ::std::os::raw::c_void,
        size: usize,
        num: usize,
    ) -> i32,
>;
pub type BslSalFileClose = ::std::option::Option<unsafe extern "C" fn(stream: bsl_sal_file_handle)>;
pub type BslSalFileLength = ::std::option::Option<
    unsafe extern "C" fn(path: *const ::std::os::raw::c_char, len: *mut usize) -> i32,
>;
pub type BslSalFileError =
    ::std::option::Option<unsafe extern "C" fn(stream: bsl_sal_file_handle) -> bool>;
pub type BslSalFileTell = ::std::option::Option<
    unsafe extern "C" fn(stream: bsl_sal_file_handle, pos: *mut ::std::os::raw::c_long) -> i32,
>;
pub type BslSalFileSeek = ::std::option::Option<
    unsafe extern "C" fn(
        stream: bsl_sal_file_handle,
        offset: ::std::os::raw::c_long,
        origin: i32,
    ) -> i32,
>;
pub type BslSalFGets = ::std::option::Option<
    unsafe extern "C" fn(
        stream: bsl_sal_file_handle,
        buf: *mut ::std::os::raw::c_char,
        readLen: i32,
    ) -> *mut ::std::os::raw::c_char,
>;
pub type BslSalFPuts = ::std::option::Option<
    unsafe extern "C" fn(stream: bsl_sal_file_handle, buf: *const ::std::os::raw::c_char) -> bool,
>;
pub type BslSalFlush =
    ::std::option::Option<unsafe extern "C" fn(stream: bsl_sal_file_handle) -> bool>;
pub type BslSalFeof =
    ::std::option::Option<unsafe extern "C" fn(stream: bsl_sal_file_handle) -> i32>;
pub type BslSalFSetAttr = ::std::option::Option<
    unsafe extern "C" fn(
        stream: bsl_sal_file_handle,
        cmd: ::std::os::raw::c_int,
        arg: *const ::std::os::raw::c_void,
    ) -> i32,
>;
pub type BslSalFGetAttr = ::std::option::Option<
    unsafe extern "C" fn(stream: bsl_sal_file_handle, arg: *mut ::std::os::raw::c_void) -> i32,
>;
pub type BslSalGetSysTime = ::std::option::Option<unsafe extern "C" fn() -> i64>;
pub type BslSalDateToStrConvert = ::std::option::Option<
    unsafe extern "C" fn(
        dateTime: *const BSL_TIME,
        timeStr: *mut ::std::os::raw::c_char,
        len: usize,
    ) -> u32,
>;
pub type BslSalSysTimeGet =
    ::std::option::Option<unsafe extern "C" fn(sysTime: *mut BSL_TIME) -> u32>;
pub type BslSalUtcTimeToDateConvert =
    ::std::option::Option<unsafe extern "C" fn(utcTime: i64, sysTime: *mut BSL_TIME) -> u32>;
pub type BslSalSleep = ::std::option::Option<unsafe extern "C" fn(time: u32)>;
pub type BslSalTick = ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_long>;
pub type BslSalTicksPerSec =
    ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_long>;
pub type BslGetTimeInNS = ::std::option::Option<unsafe extern "C" fn() -> u64>;
pub type BslSalWrite = ::std::option::Option<
    unsafe extern "C" fn(
        fd: i32,
        buf: *const ::std::os::raw::c_void,
        len: u32,
        err: *mut i32,
    ) -> i32,
>;
pub type BslSalRead = ::std::option::Option<
    unsafe extern "C" fn(fd: i32, buf: *mut ::std::os::raw::c_void, len: u32, err: *mut i32) -> i32,
>;
pub type BslSalSocket =
    ::std::option::Option<unsafe extern "C" fn(af: i32, type_: i32, protocol: i32) -> i32>;
pub type BslSalSockClose = ::std::option::Option<unsafe extern "C" fn(sockId: i32) -> i32>;
pub type BslSalSetSockopt = ::std::option::Option<
    unsafe extern "C" fn(
        sockId: i32,
        level: i32,
        name: i32,
        val: *const ::std::os::raw::c_void,
        len: i32,
    ) -> i32,
>;
pub type BslSalGetSockopt = ::std::option::Option<
    unsafe extern "C" fn(
        sockId: i32,
        level: i32,
        name: i32,
        val: *mut ::std::os::raw::c_void,
        len: *mut i32,
    ) -> i32,
>;
pub type BslSalSockListen =
    ::std::option::Option<unsafe extern "C" fn(sockId: i32, backlog: i32) -> i32>;
pub type BslSalSockBind = ::std::option::Option<
    unsafe extern "C" fn(sockId: i32, addr: BSL_SAL_SockAddr, len: usize) -> i32,
>;
pub type BslSalSockConnect = ::std::option::Option<
    unsafe extern "C" fn(sockId: i32, addr: BSL_SAL_SockAddr, len: usize) -> i32,
>;
pub type BslSalSockSend = ::std::option::Option<
    unsafe extern "C" fn(
        sockId: i32,
        msg: *const ::std::os::raw::c_void,
        len: usize,
        flags: i32,
    ) -> i32,
>;
pub type BslSalSockRecv = ::std::option::Option<
    unsafe extern "C" fn(
        sockfd: i32,
        buff: *mut ::std::os::raw::c_void,
        len: usize,
        flags: i32,
    ) -> i32,
>;
pub type BslSalNetSendTo = ::std::option::Option<
    unsafe extern "C" fn(
        sock: i32,
        buf: *const ::std::os::raw::c_void,
        len: usize,
        flags: i32,
        address: *mut ::std::os::raw::c_void,
        addrLen: i32,
        err: *mut i32,
    ) -> i32,
>;
pub type BslSalNetRecvFrom = ::std::option::Option<
    unsafe extern "C" fn(
        sock: i32,
        buf: *mut ::std::os::raw::c_void,
        len: usize,
        flags: i32,
        address: *mut ::std::os::raw::c_void,
        addrLen: *mut i32,
        err: *mut i32,
    ) -> i32,
>;
pub type BslSalSelect = ::std::option::Option<
    unsafe extern "C" fn(
        nfds: i32,
        readfds: *mut ::std::os::raw::c_void,
        writefds: *mut ::std::os::raw::c_void,
        exceptfds: *mut ::std::os::raw::c_void,
        timeout: *mut ::std::os::raw::c_void,
    ) -> i32,
>;
pub type BslSalIoctlsocket = ::std::option::Option<
    unsafe extern "C" fn(
        sockId: i32,
        cmd: ::std::os::raw::c_long,
        arg: *mut ::std::os::raw::c_ulong,
    ) -> i32,
>;
pub type BslSalSockGetLastSocketError = ::std::option::Option<unsafe extern "C" fn() -> i32>;
unsafe extern "C" {
    pub fn BSL_SAL_CallBack_Ctrl(
        funcType: BSL_SAL_CB_FUNC_TYPE,
        funcCb: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_LoadLib(
        fileName: *const ::std::os::raw::c_char,
        handle: *mut *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_UnLoadLib(handle: *mut ::std::os::raw::c_void) -> i32;
}
unsafe extern "C" {
    pub fn BSL_SAL_GetFuncAddress(
        handle: *mut ::std::os::raw::c_void,
        funcName: *const ::std::os::raw::c_char,
        func: *mut *mut ::std::os::raw::c_void,
    ) -> i32;
}
pub const BSL_SAL_LIB_FMT_OFF: BSL_SAL_LibFmtCmd = 0;
pub const BSL_SAL_LIB_FMT_SO: BSL_SAL_LibFmtCmd = 1;
pub const BSL_SAL_LIB_FMT_LIBSO: BSL_SAL_LibFmtCmd = 2;
pub const BSL_SAL_LIB_FMT_LIBDLL: BSL_SAL_LibFmtCmd = 3;
pub const BSL_SAL_LIB_FMT_DLL: BSL_SAL_LibFmtCmd = 4;
pub type BSL_SAL_LibFmtCmd = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn BSL_SAL_LibNameFormat(
        cmd: BSL_SAL_LibFmtCmd,
        fileName: *const ::std::os::raw::c_char,
        name: *mut *mut ::std::os::raw::c_char,
    ) -> i32;
}
pub type BslSalLoadLib = ::std::option::Option<
    unsafe extern "C" fn(
        fileName: *const ::std::os::raw::c_char,
        handle: *mut *mut ::std::os::raw::c_void,
    ) -> i32,
>;
pub type BslSalUnLoadLib =
    ::std::option::Option<unsafe extern "C" fn(handle: *mut ::std::os::raw::c_void) -> i32>;
pub type BslSalGetFunc = ::std::option::Option<
    unsafe extern "C" fn(
        handle: *mut ::std::os::raw::c_void,
        funcName: *const ::std::os::raw::c_char,
        func: *mut *mut ::std::os::raw::c_void,
    ) -> i32,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
    pub _address: u8,
}
